package com.neu.icloud.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.neu.icloud.entity.User;

@Mapper
public interface UserMapper {
	
	//注册用户
	@Insert("insert into user(userName,loginName,password,userLevel,factoryId) values(#{userName},#{loginName},#{password},#{userLevel},#{factoryId})")
	public int saveUser(User user);
	
	//按登录名和密码进行登录
	@Select("select * from user where loginName=#{loginName} and password=#{password}")
	public User getUserByIdByPass(User user);
}
